#!/usr/bin/python

"""arrange.py

this script is
"""

__author__ = 'takahiro'
__version__ = '2014-02-10 1.00 (takahiro)'

import sys
import optparse
import re

usage = "%prog [filename]"
parser = optparse.OptionParser( usage=usage )
parser.parse_args( )

if len( sys.argv ) == 1:
  stream = sys.stdin
elif len( sys.argv ) == 2:
  stream = open( sys.argv[ 1 ], 'r' )
else:
  parser.print_help( )
  exit( )

re_anyspace = re.compile( r'\s+' )

for line in stream:
  array = re_anyspace.split(line.rstrip())
  if len(array) == 5:
    array.append('0')
  print '\t'.join(array)

